package com.yanqu.road.entity.activity.advertisement;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.utils.string.StringUtils;

import java.util.List;
import java.util.Map;
import java.util.Objects;

@FieldTypeAnnotation(tableName = "t_u_advertisement_activity_user",desc = "广告活动用户数据")
public class AdvertisementUserData extends DataObject {
    @FieldTypeAnnotation(desc = "活动id",select = true,update = true)
    private int activityId;
    @FieldTypeAnnotation(desc = "玩家id",select = true,update = true)
    private long userId;
    @FieldTypeAnnotation(desc = "广告系统数据")
    private Map<Integer,AdvertisementSystemData> systemDataMap;
    @FieldTypeAnnotation(desc = "激活广告活动时间")
    private long activeTime;
    @FieldTypeAnnotation(desc = "广告活动总数据")
    private Map<Integer,Integer> totalWatchData;

    @FieldTypeAnnotation(desc = "广告赚速加成上次获得时间")
    private long earnSpeedBuffRefreshTime;
    @FieldTypeAnnotation(desc = "广告赚速加成次数")
    private int earnSpeedBuffCount;

    @FieldTypeAnnotation(desc = "广告当前npc奖励")
    private String npcReward;
    @FieldTypeAnnotation(desc = "广告npc当前处于每日阶段")
    private long npcDailyStage;
    @FieldTypeAnnotation(desc = "广告npc礼包上次刷新时间")
    private long npcLastRefreshTime;




    public int getActivityId() {
        return activityId;
    }
    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId() {
        return userId;
    }
    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public java.util.Map<java.lang.Integer, com.yanqu.road.entity.activity.advertisement.AdvertisementSystemData> getSystemDataMap() {
        return systemDataMap;
    }
    public void setSystemDataMap(java.util.Map<java.lang.Integer, com.yanqu.road.entity.activity.advertisement.AdvertisementSystemData> systemDataMap) {
        if (null == systemDataMap){
            return;
        }
        if (this.systemDataMap == null || !this.systemDataMap.equals(systemDataMap)) {
            this.systemDataMap = systemDataMap;
            setOp(DataStatus.Update);
        }
    }

    public long getActiveTime() {
        return activeTime;
    }
    public void setActiveTime(long activeTime) {
        if (this.activeTime != activeTime) {
            this.activeTime = activeTime;
            setOp(DataStatus.Update);
        }
    }

    public java.util.Map<java.lang.Integer, java.lang.Integer> getTotalWatchData() {
        return totalWatchData;
    }
    public void setTotalWatchData(java.util.Map<java.lang.Integer, java.lang.Integer> totalWatchData) {
        if (null == totalWatchData){
            return;
        }
        if (this.totalWatchData == null || !this.totalWatchData.equals(totalWatchData)) {
            this.totalWatchData = totalWatchData;
            setOp(DataStatus.Update);
        }
    }

    public long getEarnSpeedBuffRefreshTime() {
        return earnSpeedBuffRefreshTime;
    }
    public void setEarnSpeedBuffRefreshTime(long earnSpeedBuffRefreshTime) {
        if (this.earnSpeedBuffRefreshTime != earnSpeedBuffRefreshTime) {
            this.earnSpeedBuffRefreshTime = earnSpeedBuffRefreshTime;
            setOp(DataStatus.Update);
        }
    }

    public int getEarnSpeedBuffCount() {
        return earnSpeedBuffCount;
    }
    public void setEarnSpeedBuffCount(int earnSpeedBuffCount) {
        if (this.earnSpeedBuffCount != earnSpeedBuffCount) {
            this.earnSpeedBuffCount = earnSpeedBuffCount;
            setOp(DataStatus.Update);
        }
    }

    public String getNpcReward() {
        return npcReward;
    }

    public void setNpcReward(String npcReward) {
        if (!Objects.equals(this.npcReward, npcReward)) {
            this.npcReward = npcReward;
            setOp(DataStatus.Update);
        }
    }

    public long getNpcLastRefreshTime() {
        return npcLastRefreshTime;
    }

    public void setNpcLastRefreshTime(long npcLastRefreshTime) {
        if (this.npcLastRefreshTime != npcLastRefreshTime) {
            this.npcLastRefreshTime = npcLastRefreshTime;
            setOp(DataStatus.Update);
        }
    }

    public long getNpcDailyStage() {
        return npcDailyStage;
    }

    public void setNpcDailyStage(long npcDailyStage) {
        if (this.npcDailyStage != npcDailyStage) {
            this.npcDailyStage = npcDailyStage;
            setOp(DataStatus.Update);
        }
    }
}
